package kd.hc.ecco;

import kd.bos.dataentity.entity.MulBasedataDynamicObjectCollection;
import kd.bos.form.control.events.BeforeItemClickEvent;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.form.events.AfterDoOperationEventArgs;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;
import java.util.HashMap;

public class CostTypeAutoTreeFormPlugin extends AbstractFormPlugin implements Plugin {

    @Override
    public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
        super.afterDoOperation(afterDoOperationEventArgs);
        String operateKey = afterDoOperationEventArgs.getOperateKey();
        if ("doOk".equalsIgnoreCase(operateKey)) {
            MulBasedataDynamicObjectCollection costType = (MulBasedataDynamicObjectCollection)  this.getModel().getValue("hc95_cost_type");
            this.getView().returnDataToParent(costType);
            this.getView().close();
        }
    }

}